import http from "@/api";
import { ResPage } from "@/api/interface";

//用户列表分页查询
export const getUserList = (params: any): Promise<any> => {
  return http.post<ResPage<any>>('/userManage/userList', params);
};

// 新增用户
export const addUser = (params: any): Promise<any> => {
  return http.post('/userManage/newUsers', params);
};


// 编辑用户
export const editUser = (params: any): Promise<any> => {
  return http.post('/userManage/userEditing', params);
};


//用户详情查询
export const userDetails = (params: any): Promise<any> =>
  http.get(`/userManage/userDetails/${params}`)


//用户禁用
export const userDisable = (params: any) =>
  http.get(`/userManage/disabled/${params}`)

//用户离职
export const userDimission = (params: any): Promise<any> => {
  return http.post('/userManage/userLeave', params);
};

//获取部门下的岗位信息（树状）
export const getPostTreeList = (): Promise<any> =>
  http.get('/userManage/getDeptDownJobInfoTree');


//用户密码重置
export const userResetPassword = (params: any): Promise<any> => {
  return http.post('/userManage/passwordReset', params);
};
